@mixin clearfix {
  &:after {
    content: "";
    display: table;
    clear: both;
  }
}

@mixin scrollBar {
  &::-webkit-scrollbar-track-piece {
    background: #d3dce6;
  }

  &::-webkit-scrollbar {
    width: 6px;
  }

  &::-webkit-scrollbar-thumb {
    background: #99a9bf;
    border-radius: 20px;
  }
}

@mixin relative {
  position: relative;
  width: 100%;
  height: 100%;
}

@mixin pct($pct) {
  width: #{$pct};
  position: relative;
  margin: 0 auto;
}

@mixin triangle($width, $height, $color, $direction) {
  $width: $width*0.5;
  $color-border-style: $height solid $color;
  $transparent-border-style: $width solid transparent;
  height: 0;
  width: 0;

  @if $direction==up {
    border-bottom: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  }

  @else if $direction==right {
    border-left: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }

  @else if $direction==down {
    border-top: $color-border-style;
    border-left: $transparent-border-style;
    border-right: $transparent-border-style;
  }

  @else if $direction==left {
    border-right: $color-border-style;
    border-top: $transparent-border-style;
    border-bottom: $transparent-border-style;
  }
}

@mixin node-color () {
  &.scene-node {
    background: #5e7fff;
    .node-icon{ color: #5e7fff; }
  }
  &.black-node {
    background: #666;
    .node-icon{ color: #666; }
  }
  &.service-node {
    background: #49c469;
    .node-icon{ color: #49c469; }
  }
  &.tsp-node {
    background: #5fbfe8;
    .node-icon{ color: #5fbfe8; }
  }
  &.third-node {
    background: #b868ed;
    .node-icon{ color: #b868ed; }
  }
  &.interactive-node {
    background: #8173ff;
    .node-icon{ color: #8173ff; }
  }
  &.advanced-node {
    background: #f79959;
    .node-icon{ color: #f79959; }
  }
  &.flow-node {
    background: #F6F7F8;
    .title, .sub-title{
      color: #838383;
    }
    .node-icon{
      background-color: #666;
      color: #FFF;
    }
  }
}
